﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


public partial class Admin_Admin_Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
             
        }
    }


    /// <summary>
    /// 登陆按钮事件
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        string UserName = this.txtUserName.Text;
        string UserPassWord = this.txtPassWord.Text;
        GZ.Entity.ESysUser obj = new GZ.Entity.ESysUser();
        if (obj.Login(UserName, UserPassWord))
        {
            Session["User"] = UserName;
            Response.Redirect("~/Admin/Main.aspx");
        }
        else
        {
            Response.Redirect("~/Admin/Admin_Login.aspx");
        }
    }
}
